package com.jiang.剑指Offer.位运算.NC257;

/**
 * @author Jiang
 * @version 1.0
 * @date 2024/12/30 21:46
 */
public class Solution {
    public int Sum_Solution(int n) {
        // boolean flag = (n > 1) && ((n += Sum_Solution(n - 1)) > 0);
        boolean flag = (n == 1) || ((n += Sum_Solution(n - 1)) > 0);
        return n;
    }
}
